home *** CD-ROM | disk | FTP | other *** search
/ The Essential Home & Business Collection / The Essential Home & Business Collection.iso / 26 / 3 / 1 / FNDFIL.ZIP / FF.BAS next >
BASIC Source File  |  1990-02-19  |  814b  |  24 lines

  1.      $COMPILE EXE
  2.      $LIB ALL OFF
  3.      $ERROR ALL OFF
  4.      $link "FindFile.pbu"
  5.      INPUT "File mask";mask$       'mask can be wildcards
  6.      numfound% = 0
  7.      a$=Findfirst$(mask$)
  8.      IF a$="" THEN
  9.         PRINT mask$ ;"Not found"
  10.         END
  11.      ELSE
  12.         PRINT mask$;" found!"
  13.         INCR numfound%
  14.     PRINT USING "\               \";a$; 'print the first file
  15.         DO
  16.             a$=Findnext$
  17.             IF a$="" THEN EXIT LOOP
  18.             PRINT USING "\               \";a$;'print the rest
  19.             INCR numfound%                  'note, you can save names
  20.         LOOP                                'by sticking them in an
  21.         PRINT                               'array, but for the demo, we
  22.         PRINT numfound%-1 ;"Files found"    'just print them
  23.      END IF
  24.